<template>
  <div>
    <el-container>
      <!-- 后台顶部 -->
      <el-header>
        <div class="header">
          <div class="header_left">
            <img
              src="https://element-plus.gitee.io/images/element-plus-logo.svg"
            />
          </div>
          <div class="header_right">
            <div>
              <el-dropdown>
                <span class="el-dropdown-link">
                  <img src="https://vitejs.cn/logo.svg" alt="" />
                  <el-icon class="el-icon--right">
                    <arrow-down />
                  </el-icon>
                </span>
                <template #dropdown>
                  <el-dropdown-menu>
                    <el-dropdown-item>Action 1</el-dropdown-item>
                    <el-dropdown-item>Action 2</el-dropdown-item>
                    <el-dropdown-item>Action 3</el-dropdown-item>
                    <el-dropdown-item disabled>Action 4</el-dropdown-item>
                    <el-dropdown-item divided>Action 5</el-dropdown-item>
                  </el-dropdown-menu>
                </template>
              </el-dropdown>
            </div>
          </div>
        </div>
      </el-header>
      <el-container>
        <el-aside width="250px">
          <el-row class="tac">
            <el-col :span="20">
              <el-menu
                default-active="2"
                class="el-menu-vertical-demo"
                @open="handleOpen"
                @close="handleClose"
              >
                <el-menu-item index="1">
                  <el-icon><icon-menu /></el-icon>
                  <span><router-link to="/census">仪表盘</router-link></span>
                </el-menu-item>
                <el-menu-item index="1">
                  <el-icon><icon-menu /></el-icon>
                  <span
                    ><router-link to="/recharge">用户充值</router-link></span
                  >
                </el-menu-item>
                <el-menu-item index="1">
                  <el-icon><icon-menu /></el-icon>
                  <span><router-link to="/consume">用户结账</router-link></span>
                </el-menu-item>
                <el-menu-item index="1">
                  <el-icon><icon-menu /></el-icon>
                  <span><router-link to="/list">用户列表</router-link></span>
                </el-menu-item>
                <el-menu-item index="1">
                  <el-icon><icon-menu /></el-icon>
                  <span><router-link to="/adduser">新增用户</router-link></span>
                </el-menu-item>
                <el-menu-item index="1">
                  <el-icon><icon-menu /></el-icon>
                  <span><router-link to="/adduser">加款记录</router-link></span>
                </el-menu-item>
                <el-menu-item index="1">
                  <el-icon><icon-menu /></el-icon>
                  <span><router-link to="/adduser">扣款记录</router-link></span>
                </el-menu-item>
              </el-menu>
            </el-col>
          </el-row>
        </el-aside>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
import { ArrowDown } from "@element-plus/icons-vue";
import { defineComponent } from "vue";
import {
  Location,
  Document,
  Menu as IconMenu,
  Setting,
} from "@element-plus/icons-vue";

export default defineComponent({
  components: {
    Location,
    Document,
    Setting,
    IconMenu,
  },
  setup() {
    const handleOpen = (key, keyPath) => {};
    const handleClose = (key, keyPath) => {};
    return {
      handleOpen,
      handleClose,
    };
  },
});
</script>

<style scoped>
.header {
  display: flex;
  justify-content: space-between;
}
.header_left img {
  width: 200px;
  height: 50px;
}
.header_right img {
  width: 45px;
}
a{
  color: black;
  
}
</style>